package com.java.date;

import java.time.Instant;
import java.util.Date;

public class InstanceTest {

    public static void main(String[] args) {
        Instant timestamp = Instant.now();
        System.out.println("Current timestamp = " + timestamp);

        Instant specificTime = Instant.ofEpochMilli(timestamp.toEpochMilli());
        System.out.println("Specific Time = " + specificTime);

        Date date = Date.from(timestamp);
        System.out.println("current date = " + date);
    }
}

